home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 7 / BBS in a Box - Macintosh - Volume VII (BBS in a Box) (January 1993).iso / Files / Prog / M / mini.cpt / mini / MiniTerm.r < prev    next >
Text File  |  1987-10-08  |  13KB  |  769 lines

  1. #include "Types.r"
  2.  
  3. /* custom resource for phone numbers  */
  4. type 'DIAL' {
  5.      cstring;
  6. };
  7.  
  8.  
  9. /* These define's are used in the MENU resources to disable specific
  10.    menu items. */
  11. #define AllItems    0b1111111111111111111111111111111    /* 31 flags */
  12. #define MenuItem1    0b0000000000001
  13. #define MenuItem2    0b0000000000010
  14. #define MenuItem3    0b0000000000100
  15. #define MenuItem4    0b0000000001000
  16. #define MenuItem5    0b0000000010000
  17. #define MenuItem6    0b0000000100000
  18. #define MenuItem7    0b0000001000000
  19. #define MenuItem8    0b0000010000000
  20. #define MenuItem9    0b0000100000000
  21. #define MenuItem10    0b0001000000000
  22. #define MenuItem11  0b0010000000000
  23. #define MenuItem12  0b0100000000000
  24. #define MenuItem13    0b1000000000000
  25. /* Include font with vt100 graphic characters */
  26.  
  27. include "vt100font" ;
  28.  
  29. resource 'MENU' (128, "Apple", preload) {
  30.     128, textMenuProc,
  31.     AllItems & ~MenuItem2,    /* Disable item #2 */
  32.     enabled, apple,
  33.     {
  34.         "About MiniTerm…",
  35.             noicon, nokey, nomark, plain;
  36.         "-",
  37.             noicon, nokey, nomark, plain
  38.     }
  39. };
  40.  
  41. resource 'MENU' (129, "File", preload) {
  42.     129, textMenuProc,
  43.     AllItems & ~(MenuItem5 | MenuItem9 | MenuItem11 ),
  44.     enabled, "File",
  45.     {
  46.         "Start Text Capture...",
  47.             noicon, nokey, nomark, plain;
  48.         "Start Text Upload...",
  49.             noicon, nokey, nomark, plain;
  50.         "Text File Creator",
  51.             noicon, "\0x1B","\0D139",plain;
  52.         "Text File Pacing...",
  53.             noicon, nokey, nomark, plain;
  54.         "-",
  55.             noicon, nokey, nomark, plain;
  56.         "Receive Xmodem...",
  57.             noicon, nokey, nomark, plain;
  58.         "Send Xmodem...",
  59.             noicon, nokey, nomark, plain;
  60.         "Xmodem Preferences",
  61.             noicon, "\0x1B", "\0D140", plain;
  62.         "-",
  63.             noicon, nokey, nomark, plain;
  64.         "Launch...",
  65.             noicon, nokey, nomark, plain;
  66.         "-",
  67.             noicon, nokey, nomark, plain;            
  68.         "Quit",
  69.             noicon, nokey, nomark, plain
  70.     }
  71. };
  72.  
  73. resource 'MENU' (130, "Edit", preload) {
  74.     130, textMenuProc,
  75.     AllItems & ~(MenuItem1 | MenuItem2),    /* Disable items #1 & #2 */
  76.     enabled, "Edit",
  77.      {
  78.         "Undo",
  79.             noicon, nokey, nomark, plain;
  80.         "-",
  81.             noicon, nokey, nomark, plain;
  82.         "Cut",
  83.             noicon, nokey, nomark, plain;
  84.         "Copy",
  85.             noicon, nokey, nomark, plain;
  86.         "Paste",
  87.             noicon, nokey, nomark, plain;
  88.         "Clear",
  89.             noicon, nokey, nomark, plain
  90.     }
  91. };
  92.  
  93. resource 'MENU' (131, "Options", preload) {
  94.     131, textMenuProc,
  95.     AllItems & ~( MenuItem4 | MenuItem8 | MenuItem13),
  96.     enabled, "Options",
  97.     {
  98.         "Baud",
  99.             noicon, "\0x1B", "\0D132", plain;
  100.         "Parity",
  101.             noicon, "\0x1B", "\0D133", plain;
  102.         "Data Bits",
  103.             noicon, "\0x1B", "\0D134", plain;
  104.         "-",
  105.             noicon, nokey, nomark, plain;
  106.         "Flow Control",
  107.             noicon, "\0x1B", "\0D136",plain;
  108.         "BS",
  109.             noicon, "\0x1B", "\0D137",plain;
  110.         "Local Echo",
  111.             noicon, "\0x1B", "\0D138",plain;
  112.         "-",
  113.             noicon, nokey, nomark, plain;
  114.         "Show Clock",
  115.             noicon, nokey, check, plain;
  116.         "Unlock Keyboard",
  117.             noicon, nokey, nomark, plain;
  118.         "Echo Cr As CrLf",
  119.             noicon, nokey, nomark, plain;
  120.         "Read Statistics",
  121.             noicon, nokey, nomark, plain;
  122.         "-",
  123.             noicon, nokey, nomark, plain;
  124.         "Interpret Controls",
  125.             noicon, nokey, check, plain;
  126.         "Reset Terminal",
  127.             noicon, nokey, nomark,plain;
  128.         "Cursor Options...",
  129.             noicon, nokey, nomark, plain
  130.             
  131.     }
  132. };
  133.  
  134. resource 'MENU' (132, "Baud", preload) {
  135.     132, textMenuProc,
  136.     allEnabled,    
  137.     enabled, "Baud",
  138.      {
  139.         "300",
  140.             noicon, nokey, nomark, plain;
  141.         "1200",
  142.             noicon, nokey, check, plain;
  143.         "2400",
  144.             noicon, nokey, nomark, plain;
  145.         "4800",
  146.             noicon, nokey, nomark, plain;
  147.         "9600",
  148.             noicon, nokey, nomark, plain;
  149.         "19200",
  150.             noicon, nokey, nomark, plain;
  151.         "57600",
  152.             noicon, nokey, nomark, plain
  153.             
  154.     }
  155. };
  156.  
  157. resource 'MENU' (133, "Parity", preload) {
  158.     133, textMenuProc,
  159.     allEnabled,    
  160.     disabled, "Parity",
  161.      {
  162.         "No Parity",
  163.             noicon, nokey, check, plain;
  164.         "Odd Parity",
  165.             noicon, nokey, nomark, plain;
  166.         "Even Parity",
  167.             noicon, nokey, nomark, plain
  168.             
  169.     }
  170. };
  171.  
  172. resource 'MENU' (134, "Data Size", preload) {
  173.     134, textMenuProc,
  174.     allEnabled,    
  175.     disabled, "Data Size",
  176.      {
  177.         "Seven Bits",
  178.             noicon, nokey, nomark, plain;
  179.         "Eight Bits",
  180.             noicon, nokey, check, plain            
  181.     }
  182. };
  183.  
  184. resource 'MENU' (135, "Phone", preload) {
  185.     135, textMenuProc,
  186.     allEnabled,    
  187.     enabled, "Phone",
  188.      {
  189.         "Phone Manager...",
  190.             noicon, nokey, nomark, plain
  191.        }
  192. };
  193.  
  194. resource 'MENU' (136, "Flow", preload) {
  195.     136, textMenuProc,
  196.     allEnabled,    
  197.     enabled, "Data Size",
  198.      {
  199.         "Enabled",
  200.             noicon, nokey, check, plain;
  201.         "Disabled",
  202.             noicon, nokey, nomark, plain            
  203.     }
  204. };
  205.  
  206. resource 'MENU' (137, "BS", preload) {
  207.     137, textMenuProc,
  208.     allEnabled,    
  209.     enabled, "Data Size",
  210.      {
  211.         "Send Delete",
  212.             noicon, nokey, check, plain;
  213.         "Send BS",
  214.             noicon, nokey, nomark, plain            
  215.     }
  216. };
  217.  
  218. resource 'MENU' (138, "LocalEcho", preload) {
  219.     138, textMenuProc,
  220.     allEnabled,    
  221.     enabled, "LocalEcho",
  222.      {
  223.         "Enabled",
  224.             noicon, nokey, nomark, plain;
  225.         "Disabled",
  226.             noicon, nokey, check, plain            
  227.     }
  228. };
  229.  
  230. resource 'MENU' (139,"Creator",preload){
  231.     139, textMenuProc,
  232.     allEnabled,
  233.     enabled, "Creator",
  234.     {
  235.         "EDIT",
  236.             noicon, nokey, nomark, plain;
  237.         "MACA",
  238.             noicon, nokey, nomark, plain;
  239.         "MSWD",
  240.             noicon, nokey, nomark, plain;
  241.         "MPS ",
  242.             noicon, nokey, check, plain
  243.     }
  244. };
  245.  
  246. resource 'MENU' ( 140, "XmodemPref",preload){
  247.     140, textMenuProc,
  248.     AllItems & ~MenuItem4,
  249.     enabled, "XModem Prefs",
  250.     {
  251.         "MacBinary",
  252.             noicon, nokey, check, plain;
  253.         "Text",
  254.             noicon, nokey, nomark, plain;
  255.         "Straight",
  256.             noicon, nokey, nomark, plain;
  257.         "-",
  258.             noicon, nokey, nomark, plain;
  259.         "Disable CRC",
  260.             noicon, nokey, nomark, plain;
  261.         "128 Byte Buffers",
  262.             noicon, nokey, check, plain;
  263.         "Fast Download",
  264.             noicon, nokey, nomark, plain
  265.     }
  266. };
  267.  
  268. resource 'MENU' (141, "Port", preload){
  269.     141, textMenuProc,
  270.     allEnabled,
  271.     enabled, "Port",
  272.     {
  273.         "Modem Port",
  274.             noicon, nokey, check, plain;
  275.         "Printer Port",
  276.             noicon, nokey, nomark, plain
  277.     }
  278. };
  279.  
  280. resource 'ALRT' (129) {
  281.     {74, 62, 184, 436},
  282.     18742,
  283.     {    /* array: 4 elements */
  284.         /* [1] */
  285.         OK, visible, silent;
  286.         /* [2] */
  287.         OK, visible, silent;
  288.         /* [3] */
  289.         OK, visible, silent;
  290.         /* [4] */
  291.         OK, visible, silent
  292.     }
  293. };
  294.  
  295. resource 'DITL' (18742) {
  296.     {    /* array DITLarray: 5 elements */
  297.         /* [1] */
  298.         {74, 270, 94, 330},
  299.         Button {
  300.             enabled,
  301.             "OK"
  302.         };
  303.         /* [2] */
  304.         {16, 16, 32, 240},
  305.         StaticText {
  306.             disabled,
  307.             "Max Chars Found In Serial Buffer:"
  308.         };
  309.         /* [3] */
  310.         {40, 16, 56, 240},
  311.         StaticText {
  312.             disabled,
  313.             "Average Read Size:"
  314.         };
  315.         /* [4] */
  316.         {16, 240, 32, 320},
  317.         StaticText {
  318.             disabled,
  319.             "^0"
  320.         };
  321.         /* [5] */
  322.         {40, 240, 56, 320},
  323.         StaticText {
  324.             disabled,
  325.             "^1"
  326.         }
  327.     }
  328. };
  329.  
  330. resource 'DLOG' (128) {
  331.     {40, 90, 320, 420},
  332.     altDBoxProc,
  333.     visible,
  334.     noGoAway,
  335.     0x0,
  336.     128,
  337.     ""
  338. };
  339.  
  340. resource 'DITL' (128) {
  341.     {    /* array DITLarray: 6 elements */
  342.         /* [1] */
  343.         {10, 115, 31, 240},
  344.         StaticText {
  345.             disabled,
  346.             "MiniTerm V2.0"
  347.         };
  348.         /* [2] */
  349.         {31, 103, 48, 222},
  350.         StaticText {
  351.             disabled,
  352.             "Copyright 1987"
  353.         };
  354.         /* [3] */
  355.         {50, 110, 111, 215},
  356.         StaticText {
  357.             disabled,
  358.             "Jerry LeVan 325 Boone Trail Richmond Ky "
  359.             "40475"
  360.         };
  361.         /* [4] */
  362.         {260, 5, 276, 125},
  363.         StaticText {
  364.             disabled,
  365.             "Written In MPW C"
  366.         };
  367.         /* [5] */
  368.         {135, 20, 170, 317},
  369.         StaticText {
  370.             disabled,
  371.             "Note 1: Hold Down Mouse During Launch to"
  372.             " Select Port."
  373.         };
  374.         /* [6] */
  375.         {185, 20, 216, 310},
  376.         StaticText {
  377.             disabled,
  378.             "Note 2: Fast Down Load Will ACK As Soon "
  379.             "As A Packet Has Been Received."
  380.         }
  381.     }
  382. };
  383.  
  384. resource 'ALRT' (128, "Message") {
  385.     {82, 36, 248, 470},
  386.     30627,
  387.     {    /* array: 4 elements */
  388.         /* [1] */
  389.         OK, visible, sound1;
  390.         /* [2] */
  391.         OK, visible, sound1;
  392.         /* [3] */
  393.         OK, visible, sound1;
  394.         /* [4] */
  395.         OK, visible, sound1
  396.     }
  397. };
  398.  
  399. resource 'DITL' (30627) {
  400.     {    /* array DITLarray: 4 elements */
  401.         /* [1] */
  402.         {112, 320, 132, 380},
  403.         Button {
  404.             enabled,
  405.             "OK"
  406.         };
  407.         /* [2] */
  408.         {59, 49, 76, 405},
  409.         StaticText {
  410.             disabled,
  411.             "^0"
  412.         };
  413.         /* [3] */
  414.         {81, 51, 97, 115},
  415.         StaticText {
  416.             disabled,
  417.             "^1"
  418.         };
  419.         /* [4] */
  420.         {82, 118, 98, 246},
  421.         StaticText {
  422.             disabled,
  423.             "^2"
  424.         }
  425.     }
  426. };
  427.  
  428. resource 'DLOG' (131) {
  429.     {74, 84, 266, 420},
  430.     altDBoxProc,
  431.     visible,
  432.     goAway,
  433.     0x0,
  434.     131,
  435.     "New Dialog"
  436. };
  437. resource 'DITL' (131) {
  438.     {    /* array DITLarray: 15 elements */
  439.         /* [1] */
  440.         {24, 16, 40, 120},
  441.         StaticText {
  442.             enabled,
  443.             "Transaction:"
  444.         };
  445.         /* [2] */
  446.         {48, 15, 64, 119},
  447.         StaticText {
  448.             disabled,
  449.             "Protocol:"
  450.         };
  451.         /* [3] */
  452.         {72, 16, 88, 120},
  453.         StaticText {
  454.             disabled,
  455.             "Error Handling:"
  456.         };
  457.         /* [4] */
  458.         {96, 16, 112, 120},
  459.         StaticText {
  460.             disabled,
  461.             "File:"
  462.         };
  463.         /* [5] */
  464.         {120, 16, 136, 64},
  465.         StaticText {
  466.             disabled,
  467.             "Block: "
  468.         };
  469.         /* [6] */
  470.         {120, 64, 136, 132},
  471.         StaticText {
  472.             disabled,
  473.             ""
  474.         };
  475.         /* [7] */
  476.         {120, 136, 136, 199},
  477.         StaticText {
  478.             disabled,
  479.             ""
  480.         };
  481.         /* [8] */
  482.         {120, 209, 136, 297},
  483.         StaticText {
  484.             disabled,
  485.             ""
  486.         };
  487.         /* [9] */
  488.         {144, 16, 160, 80},
  489.         StaticText {
  490.             disabled,
  491.             "Status:"
  492.         };
  493.         /* [10] */
  494.         {144, 72, 160, 325},
  495.         StaticText {
  496.             disabled,
  497.             ""
  498.         };
  499.         /* [11] */
  500.         {169, 87, 185, 239},
  501.         StaticText {
  502.             disabled,
  503.             "(Click Mouse To Abort)"
  504.         };
  505.         /* [12] */
  506.         {96, 120, 112, 324},
  507.         StaticText {
  508.             disabled,
  509.             ""
  510.         };
  511.         /* [13] */
  512.         {24, 120, 40, 288},
  513.         StaticText {
  514.             disabled,
  515.             ""
  516.         };
  517.         /* [14] */
  518.         {48, 120, 64, 326},
  519.         StaticText {
  520.             disabled,
  521.             ""
  522.         };
  523.         /* [15] */
  524.         {72, 120, 88, 326},
  525.         StaticText {
  526.             disabled,
  527.             ""
  528.         }
  529.     }
  530. };
  531. resource 'DLOG' (5088, "Pacing") {
  532.     {52, 88, 246, 410},
  533.     altDBoxProc,
  534.     visible,
  535.     noGoAway,
  536.     0x0,
  537.     3579,
  538.     "New Dialog"
  539. };
  540.  
  541. resource 'DITL' (3579, "Pacing") {
  542.     {    /* array DITLarray: 7 elements */
  543.         /* [1] */
  544.         {152, 232, 172, 292},
  545.         Button {
  546.             enabled,
  547.             "OK"
  548.         },
  549.         /* [2] */
  550.         {16, 64, 32, 256},
  551.         StaticText {
  552.             disabled,
  553.             "Text File Upload Preferences"
  554.         },
  555.         /* [3] */
  556.         {39, 64, 56, 201},
  557.         CheckBox {
  558.             enabled,
  559.             "Use Line Pacing"
  560.         },
  561.         /* [4] */
  562.         {70, 207, 86, 227},
  563.         EditText {
  564.             enabled,
  565.             ":"
  566.         },
  567.         /* [5] */
  568.         {69, 66, 88, 186},
  569.         StaticText {
  570.             disabled,
  571.             "Pacing Character:"
  572.         },
  573.         /* [6] */
  574.         {115, 208, 129, 235},
  575.         EditText {
  576.             enabled,
  577.             "0"
  578.         },
  579.         /* [7] */
  580.         {112, 16, 154, 201},
  581.         StaticText {
  582.             disabled,
  583.             "Delay Between Characters:\n(In Ticks,Alwa"
  584.             "ys Used.)"
  585.         }
  586.     }
  587. };
  588.  
  589. resource 'DLOG' (7835, "Cursor Options") {
  590.     {72, 120, 266, 368},
  591.     altDBoxProc,
  592.     visible,
  593.     goAway,
  594.     0x0,
  595.     7281,
  596.     "New Dialog"
  597. };
  598.  
  599. resource 'DITL' (7281, "Cursor Options") {
  600.     {    /* array DITLarray: 6 elements */
  601.         /* [1] */
  602.         {160, 168, 176, 224},
  603.         Button {
  604.             enabled,
  605.             "OK"
  606.         },
  607.         /* [2] */
  608.         {8, 64, 24, 168},
  609.         StaticText {
  610.             disabled,
  611.             "Cursor Options"
  612.         },
  613.         /* [3] */
  614.         {40, 40, 56, 152},
  615.         RadioButton {
  616.             enabled,
  617.             "Block Cursor"
  618.         },
  619.         /* [4] */
  620.         {72, 40, 88, 168},
  621.         RadioButton {
  622.             enabled,
  623.             "Underline Cursor"
  624.         },
  625.         /* [5] */
  626.         {112, 40, 128, 160},
  627.         CheckBox {
  628.             enabled,
  629.             "Blinking Cursor"
  630.         },
  631.         /* [6] */
  632.         {136, 40, 152, 160},
  633.         CheckBox {
  634.             enabled,
  635.             "Cursor Visible"
  636.         }
  637.     }
  638. };
  639.  
  640. resource 'WIND' (128,"AppWind"){
  641.  {40,8,312,504},
  642.  documentProc,
  643.  visible,
  644.  noGoAway,
  645.  0x0,
  646.  "MiniTerm v2.0"
  647.  };
  648.  
  649. /* phone numbers */
  650.  
  651.  resource 'DIAL' (128, "BigVax", preload ) {
  652.     "622-2340";
  653.  };
  654.  
  655. resource 'DIAL' (129, "BabyVax",preload ) {
  656.     "622-2042";
  657. };
  658.  
  659. resource 'DIAL' (130, "CompuServe [76354,364]", preload) {
  660.     "623-1807"
  661. };
  662.  
  663. resource 'DIAL' (131, "MCI", preload) {
  664.     "1-800-234-6245"
  665. };
  666.  
  667. resource 'DIAL' (132, "Genie [XPC12663]", preload) {
  668.     "1-253-1556"
  669. };
  670.  
  671. resource 'DIAL' (133, "UNIX1", preload) {
  672.     "622-2250"
  673. };
  674.  
  675. resource 'DITL' (200) {
  676.     {    /* array DITLarray: 13 elements */
  677.         /* [1] */
  678.         {40, 368, 56, 424},
  679.         Button {
  680.             enabled,
  681.             "Dial"
  682.         },
  683.         /* [2] */
  684.         {80, 368, 96, 424},
  685.         Button {
  686.             enabled,
  687.             "Cancel"
  688.         },
  689.         
  690.         /* [3] */
  691.         {224, 368, 240, 424},
  692.         Button {
  693.             enabled,
  694.             "Add"
  695.         },
  696.         /* [4] */
  697.         {120, 368, 136, 424},
  698.         Button {
  699.             enabled,
  700.             "Delete"
  701.         },
  702.         /* [5] */
  703.         {224, 8, 243, 61},
  704.         StaticText {
  705.             enabled,
  706.             "Name:"
  707.         },
  708.         /* [6] */
  709.         {256, 8, 276, 68},
  710.         StaticText {
  711.             enabled,
  712.             "Number:"
  713.         },
  714.         /* [7] */
  715.         {224, 80, 240, 344},
  716.         EditText {
  717.             enabled,
  718.             "Put Name Here"
  719.         },
  720.         /* [8] */
  721.         {256, 80, 272, 344},
  722.         EditText {
  723.             enabled,
  724.             "Put Number Here"
  725.         },
  726.         /* [9] */
  727.         {37, 9, 146, 323},
  728.         UserItem {
  729.             enabled
  730.         },
  731.         /* [10] */
  732.         {152, 8, 176, 128},
  733.         StaticText {
  734.             disabled,
  735.             "Current Number:"
  736.         },
  737.         /* [11] */
  738.         {152, 128, 176, 320},
  739.         StaticText {
  740.             disabled,
  741.             ""
  742.         },
  743.         /* [12] */
  744.         {192, 8, 208, 408},
  745.         StaticText {
  746.             disabled,
  747.             "To Add An Entry Fill Bottom Fields And C"
  748.             "lick The Add Button."
  749.         },
  750.         /* [13] */
  751.         {8, 120, 26, 210},
  752.         StaticText {
  753.             disabled,
  754.             "Phone Book"
  755.         }
  756.     }
  757. };
  758.  
  759. resource 'DLOG' (200, "Dialer") {
  760.     {36, 20, 330, 494},
  761.     altDBoxProc,
  762.     visible,
  763.     noGoAway,
  764.     0x0,
  765.     200,
  766.     "New Dialog"
  767. };
  768.  
  769.